package xujun.control.map;

import java.awt.*;
import java.awt.geom.Ellipse2D;

/**
 * @author 徐骏
 * @data 2010-7-29
 */
public class CircleNode extends NodeEntity {
    public CircleNode(float scaleX, float scaleY, int diameter, String layer, String nodeText) {
        super(scaleX, scaleY, layer, nodeText);
        this.setLayer(layer);
        setNodeWidth(diameter);
        setNodeHeight(diameter);
    }

    @Override
    public Shape getArea() {
        return new Ellipse2D.Double(getInViewPoint().getX(), getInViewPoint().getY(), getNodeWidth(), getNodeHeight());
    }

}
